import React from 'react'
import { Navigate } from 'react-router-dom'

const  AuthRoute = () => {
  return (
    <>
      {
        localStorage.getItem('token')?this.props.children:<Navigate to='/login' />
      }
    </>
  )
}
export default AuthRoute